// 绘制二次贝塞尔曲线
import BaseElement from './element';
class Quadratic extends BaseElement {
    constructor(opts) {
        super(opts);
    }

    draw(ctx) {
        this.beforDraw(ctx);

        let { x: x1, y: y1 } = this.points[0];
        let { x: x2, y: y2 } = this.points[1];
        let { x: x3, y: y3 } = this.points[2];

        ctx.moveTo(x1, y1);
        ctx.quadraticCurveTo(x3, y3, x2, y2);
        this.afterDraw(ctx);
    }

    addPoint() {}
    update() {}
}
export default Quadratic;
